package com.aidex.biz.service.impl;

import java.util.List;
import com.aidex.common.annotation.DataScope;
import com.github.pagehelper.PageInfo;
import com.aidex.common.core.domain.entity.SysUser;
import com.aidex.common.core.domain.entity.SysDept;
import com.aidex.common.core.service.BaseServiceImpl;
import com.aidex.framework.cache.DeptUtils;
import com.aidex.framework.cache.UserUtils;
import org.springframework.stereotype.Service;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.aidex.biz.mapper.ZhongdianProjectMapper;
import com.aidex.biz.domain.ZhongdianProject;
import com.aidex.biz.service.ZhongdianProjectService;
import org.springframework.transaction.annotation.Transactional;
import com.aidex.common.utils.NumberUtils;

/**
 * 重点项目Service业务层处理
 * @author sean
 * @email 2074844820@qq.com
 * @date 2025-05-13
 */
@Service
@Transactional(readOnly = true)
public class ZhongdianProjectServiceImpl extends BaseServiceImpl<ZhongdianProjectMapper, ZhongdianProject> implements ZhongdianProjectService
{
    private static final Logger log = LoggerFactory.getLogger(ZhongdianProjectServiceImpl.class);

    /**
     * 获取单条数据
     * @param zhongdianProject 重点项目
     * @return 重点项目
     */
    @Override
    public ZhongdianProject get(ZhongdianProject zhongdianProject)
    {
        ZhongdianProject dto = super.get(zhongdianProject);
        return dto;
    }

    /**
     * 获取单条数据
     * @param id 重点项目id
     * @return 重点项目
     */
    @Override
    public ZhongdianProject get(String id)
    {
        ZhongdianProject dto = super.get(id);
        return dto;
    }


    /**
     * 查询重点项目列表
     * @param zhongdianProject 重点项目
     * @return 重点项目
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public List<ZhongdianProject> findList(ZhongdianProject zhongdianProject)
    {
        return super.findList(zhongdianProject);
    }

    /**
     * 分页查询重点项目列表
     * @param zhongdianProject 重点项目
     * @return 重点项目
     */
    @Override
    @DataScope(userAlias = "a",deptAlias = "a")
    public PageInfo<ZhongdianProject> findPage(ZhongdianProject zhongdianProject)
    {
        return super.findPage(zhongdianProject);
    }

    /**
     * 保存重点项目
     * @param zhongdianProject
     * @return 结果
     */
    @Override
    public boolean save(ZhongdianProject zhongdianProject)
    {
        return super.save(zhongdianProject);
    }


    /**
     * 删除重点项目信息
     * @param zhongdianProject
     * @return 结果
     */
    @Override
    public boolean remove(ZhongdianProject zhongdianProject)
    {
        return super.remove(zhongdianProject);
    }

    /**
     * 批量删除重点项目
     * @param ids 需要删除的重点项目ID
     * @return 结果
     */
    @Transactional(readOnly = false)
    @Override
    public int deleteZhongdianProjectByIds(String[] ids)
    {
        return mapper.deleteZhongdianProjectByIds(ids);
    }

    /**
     * 获取最大编号
     * @param zhongdianProject 重点项目
     * @return 结果
     */
    @Override
    public int findMaxSort(ZhongdianProject zhongdianProject)
    {
        return NumberUtils.nextOrder(mapper.findMaxSort(zhongdianProject));
    }
}
